/* 
	PROGRAM: Thanatos
	AUTHOR: Dwyer, Patrick; Easton, Sean; Roy, Bobby 
	FSU GARNET ID: pmd04; sde07; rcr05e
	COURSE INFORMATION: CNT5412
	Due Date: 04/19/2011
	
	SUMMARY 
		Main
*/

#include "FreenetNode.h"
#include "ISelectionFunc.h"
#include <iostream>
#include <string>

using namespace std;

int main()
{
    Node *initNode, *next;
    /*
      Bobby's node: 128.186.122.191
    */
    initNode = new FreenetNode("213.139.166.59", "9481");
    /*
=======
    initNode = new FreenetNode("127.0.0.1", "9481");
>>>>>>> .r28
    */
    ISelectionFunc * select = new BFSSelection;
    vector<Node*> all;
    vector<Node*> done;
    vector<Node*> currentPeers;
    
    // fillout initNode's data before passing GO
    //initNode->SetIP("98.230.1.180"); // 
    //initNode->SetPort(9841);  // default is 9481
    if (initNode->Connect() == 0)
    {
      initNode->GetPeers();
      initNode->Disconnect();
    }

    // all.push_back(initNode);
    
    
    //next = initNode;
    
    /*while(next != NULL)
    {
        if (next->Connect() == 0)
        {
            currentPeers = next->GetPeers();
            //add next.m_peers to all
            next->Disconnect();
        }
        else
        {
            //Connect failed
            cerr<<"Connect to Node failed! Node info: asdf"<<endl;        
        }
        (*select)(all, done, next);
	currentPeers.clear();
     }*/
    
    
    
    //Done traversing here... que the super awesome fun-ness!

    return 0;
}
